package me.khrystal.rxnews.module.news.model;

import me.khrystal.rxnews.callback.RequestCallback;
import rx.Subscription;

/**
 * usage:
 * author: kHRYSTAL
 * create time: 16/4/29
 * update time:
 * email: 723526676@qq.com
 */
public interface INewsChannelInteractor<T> {

    /**
     * 初始化查询或增删排序频道，更新数据库操作
     * @param callback
     * @param channelName
     * @param selectSatae
     * @return
     */
    Subscription channelDbOperate(RequestCallback<T> callback,String channelName,Boolean selectSatae);

    /**
     * 拖拽时更新数据库
     * @param callback
     * @param fromPos
     * @param toPos
     * @return
     */
    Subscription channelDbSwap(RequestCallback callback,int fromPos,int toPos);
}
